import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text("Flutter Demo", style: TextStyle(color: Colors.white)),
          backgroundColor: Colors.blue,
        ),
        body: HomePage(),
      ),
    );
  }
}

class HomePage extends StatelessWidget {
  const HomePage({super.key});

  @override
  Widget build(BuildContext context) {
    // 获取屏幕的宽高
    // final size = MediaQuery.of(context).size;
    return ListView(
      children: [
        Card(
          // Card的阴影效果
          shape: RoundedRectangleBorder(
            borderRadius: BorderRadius.circular(20)
          ),
          elevation: 20, // 阴影的深度
          margin: EdgeInsets.all(10),
          child: Column(
            children: [
              ListTile(
                title: Text(
                  "张三",
                  style: TextStyle(fontSize: 28),
                ),
                subtitle: Text("高级软件工程师"),
              ),
              Divider(),
              ListTile(
                title: Text(
                  "电话：15228325028",
                ),
              ),
              ListTile(
                title: Text(
                  "地址：四川省成华区",
                ),
              ),
            ],
          ),
        ),
        Card(
          elevation: 20,
          // color: Colors.black12, // 背景颜色
          margin: EdgeInsets.all(10),
          child: Column(
            children: [
              ListTile(
                title: Text(
                  "张三",
                  style: TextStyle(fontSize: 28),
                ),
                subtitle: Text("高级软件工程师"),
              ),
              Divider(),
              ListTile(
                title: Text(
                  "电话：15228325028",
                ),
              ),
              ListTile(
                title: Text(
                  "地址：四川省成华区",
                ),
              ),
            ],
          ),
        ),
      ],
    );
  }
  // 页面上显示一个容器 宽度是屏幕的宽度 高度是容器的
}
